package com.triz.business.service.impl;

import java.util.List;
import com.triz.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.triz.business.mapper.PatentSearchMapper;
import com.triz.business.domain.PatentSearch;
import com.triz.business.service.IPatentSearchService;

/**
 * 专利查询Service业务层处理
 * 
 * @author hlk
 * @date 2025-11-11
 */
@Service
public class PatentSearchServiceImpl implements IPatentSearchService 
{
    @Autowired
    private PatentSearchMapper patentSearchMapper;

    /**
     * 查询专利查询
     * 
     * @param id 专利查询主键
     * @return 专利查询
     */
    @Override
    public PatentSearch selectPatentSearchById(Long id)
    {
        return patentSearchMapper.selectPatentSearchById(id);
    }

    /**
     * 查询专利查询列表
     * 
     * @param patentSearch 专利查询
     * @return 专利查询
     */
    @Override
    public List<PatentSearch> selectPatentSearchList(PatentSearch patentSearch)
    {
        return patentSearchMapper.selectPatentSearchList(patentSearch);
    }

    /**
     * 新增专利查询
     * 
     * @param patentSearch 专利查询
     * @return 结果
     */
    @Override
    public int insertPatentSearch(PatentSearch patentSearch)
    {
        patentSearch.setCreateTime(DateUtils.getNowDate());
        return patentSearchMapper.insertPatentSearch(patentSearch);
    }

    /**
     * 修改专利查询
     * 
     * @param patentSearch 专利查询
     * @return 结果
     */
    @Override
    public int updatePatentSearch(PatentSearch patentSearch)
    {
        patentSearch.setUpdateTime(DateUtils.getNowDate());
        return patentSearchMapper.updatePatentSearch(patentSearch);
    }

    /**
     * 批量删除专利查询
     * 
     * @param ids 需要删除的专利查询主键
     * @return 结果
     */
    @Override
    public int deletePatentSearchByIds(Long[] ids)
    {
        return patentSearchMapper.deletePatentSearchByIds(ids);
    }

    /**
     * 删除专利查询信息
     * 
     * @param id 专利查询主键
     * @return 结果
     */
    @Override
    public int deletePatentSearchById(Long id)
    {
        return patentSearchMapper.deletePatentSearchById(id);
    }

}
